//
//  NewestModel.swift
//
//  Created by 邱仙凯 on 2023/9/4
//  Copyright (c) . All rights reserved.
//

import Foundation
import ObjectMapper

public struct NewestModel_Z: Mappable {

  // MARK: Declaration for string constants to be used to decode and also serialize.
  private struct SerializationKeys {
    static let zMaxPrice = "z_max_price"
    static let zBidCount = "z_bid_count"
    static let idKey = "id_key"
    static let zPriceRank = "z_price_rank"
      static let zMyPriceRank = "z_my_price_rank"
      static let zMyPrice = "z_my_price"

      static let zParallel = "z_parallel"
      
      
    
        
        static let zIfOvertime = "z_if_overtime"
        static let zOvertimeNum = "z_overtime_num"
        static let zOvertimeTime = "z_overtime_time"
        static let zOvertimedNum = "z_overtimed_num"
        
        static let zEndDate = "z_end_date"

  }

  // MARK: Properties
  public var zMaxPrice: String?
  public var zBidCount: String?
    public var zParallel: String?

    public var zMyPrice: String?

  public var idKey: String?
  public var zPriceRank: String?
    public var zMyPriceRank: String?
    public var zEndDate: String?

  
    public var zIfOvertime: String?
    public var zOvertimeNum: String?
    public var zOvertimeTime: String?
    public var zOvertimedNum: String?
  // MARK: ObjectMapper Initializers
  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public init?(map: Map){

  }

  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public mutating func mapping(map: Map) {
      zParallel <- map[SerializationKeys.zParallel]

    zMaxPrice <- map[SerializationKeys.zMaxPrice]
    zBidCount <- (map[SerializationKeys.zBidCount],StringTransform())
    idKey <- (map[SerializationKeys.idKey],StringTransform())
    zPriceRank <- map[SerializationKeys.zPriceRank]
      zMyPriceRank <- (map[SerializationKeys.zMyPriceRank],StringTransform())
      zMyPrice <- (map[SerializationKeys.zMyPrice],StringTransform_test())
      zEndDate <- map[SerializationKeys.zEndDate]

      
      zIfOvertime <- (map[SerializationKeys.zIfOvertime],StringTransform())
      zOvertimeNum <- (map[SerializationKeys.zOvertimeNum],StringTransform())
      zOvertimeTime <- (map[SerializationKeys.zOvertimeTime],StringTransform())
      zOvertimedNum <- (map[SerializationKeys.zOvertimedNum],StringTransform())
  }

  /// Generates description of the object in the form of a NSDictionary.
  ///
  /// - returns: A Key value pair containing all valid values in the object.
  public func dictionaryRepresentation() -> [String: Any] {
    var dictionary: [String: Any] = [:]
    if let value = zMaxPrice { dictionary[SerializationKeys.zMaxPrice] = value }
    if let value = zBidCount { dictionary[SerializationKeys.zBidCount] = value }
    if let value = idKey { dictionary[SerializationKeys.idKey] = value }
    if let value = zPriceRank { dictionary[SerializationKeys.zPriceRank] = value }
    return dictionary
  }

}
